home *** CD-ROM | disk | FTP | other *** search
/ Tech Arsenal 1 / Tech Arsenal (Arsenal Computer).ISO / tek-13 / xviexe.zip / HELP < prev    next >
Text File  |  1992-07-28  |  10KB  |  295 lines

  1. If you don't know how to use vi (or xvi) at all, you should not
  2. read through this help text; it is intended simply as a reminder
  3. for those who already know how to use the editor.
  4.  
  5. To get out of xvi, type the following:
  6.         :q!
  7. and then press RETURN.
  8.  
  9. The rest of this file contains a summary of xvi commands.
  10. If you remember the commands ^D (control-D) and ^U (control-U)
  11. then that will be enough to get you around this help file.
  12.  
  13. Numeric Prefixes
  14. ================
  15.  
  16. Most commands can be prefixed with a number, which will alter
  17. their action. For instance, to go to line 37 of a file, you can
  18. type
  19.  
  20.         37G
  21.  
  22. but beware - the meaning of the prefix varies between commands.
  23.  
  24. Cursor positioning
  25. ==================
  26.  
  27.         ^F      Move forward one screenful in file
  28.         ^B      Move backward one screenful
  29.         ^D      Scroll down half screen
  30.         ^U      Scroll up half screen
  31.         G       Goto line (defaults to end of file)
  32.         /re     Next occurence of regular expression 're'
  33.         ?re     Prior occurence of regular expression 're'
  34.         n       Repeat last / or ?
  35.         N       Reverse last / or ?
  36.         %       Find matching (, ), {, }, [, or ]
  37.         ]]      Start of next function
  38.         [[      Start of previous function
  39.         g       Go to next buffer window
  40.  
  41. Adjusting the screen
  42. ====================
  43.  
  44.         ^L      Redraw the screen
  45.         ^E      Scroll window down 1 line
  46.         ^Y      Scroll window up 1 line
  47.  
  48.         z<CR>   Redraw, current line at top
  49.         z-      ... at bottom
  50.         z.      ... at centre
  51.  
  52.         ^T      Shrink current window by 1 line
  53.         ^W      Grow current window by 1 line
  54.         ^O      Grow current window to maximum size
  55.  
  56. Character Positioning
  57. =====================
  58.  
  59.         ^       First non-white on current line
  60.         0       Beginning of line
  61.         $       End of line
  62.         h       Left one character
  63.         l       Right one character
  64.         ^H      Same as 'h'
  65.         space   Same as 'l'
  66.         fx      Find 'x' forward in current line
  67.         Fx      Find 'x' backward in current line
  68.         tx      Go up to 'x' forward in current line
  69.         Tx      Go up to 'x' backward in current line
  70.         ;       Repeat last f, F, t, or T
  71.         ,       Repeat last f, F, t, or T, changing direction
  72.         |       Go to specified column in current line
  73.  
  74. Line Positioning
  75. ================
  76.  
  77.         H       Go to home window line
  78.         L       Go to last window line
  79.         M       Go to middle window line
  80.         +       Go to next line, at first non-white
  81.         -       Go to previous line, at first non-white
  82.         CR      Same as +
  83.         j       Go down, staying in same column if possible
  84.         k       Go up, staying in same column if possible
  85.  
  86. Words, sentences, paragraphs
  87. ============================
  88.  
  89.         w       Go to start of next word
  90.         b       Go to start of previous word
  91.         e       Go to end of current word
  92.         W       As w, but using blanks to delimit words
  93.         B       As b, but using blanks to delimit words
  94.         E       As e, but using blanks to delimit words
  95.         )       Go to start of next sentence (not yet implemented)
  96.         (       Go to start of previous sentence (not yet implemented)
  97.         }       Go to start of next paragraph
  98.         {       Go to start of previous paragraph
  99.  
  100. Marking and Returning
  101. =====================
  102.  
  103.         ``      Go to previous context position
  104.         ''      Go to previous context line
  105.         mx      Mark current position with letter 'x'
  106.         `x      Go to mark 'x'
  107.         'x      Go to mark 'x' at first non-white in line
  108.         :ka     Mark current line with letter 'a'
  109.         :7ka    Mark line 7 with letter 'a'
  110.  
  111. Insert and Replace
  112. ==================
  113.  
  114.         a       Append after cursor
  115.         i       Insert before cursor
  116.         A       Append at end of current line
  117.         I       Insert before first non-blank on current line
  118.         o       Open line below current line
  119.         O       Open line above current line
  120.         rx      Replace single character with 'x'
  121.         R       Enter replace (overwrite) mode
  122.  
  123. Operators (double to affect lines)
  124. ==================================
  125.  
  126.         d       Delete
  127.         c       Change
  128.         y       Yank to buffer (to be put back with 'p' or 'P')
  129.         <       Left shift (by no of spaces specified by "shiftwidth" parameter)
  130.         >       Right shift (ditto)
  131.                 !               Pipe line range through specified system command
  132.  
  133. Miscellaneous operations
  134. ========================
  135.  
  136.         C       Change rest of line
  137.         D       Delete rest of line
  138.         s       Substitute characters
  139.         S       As cc (unimplemented)
  140.         J       Join next line on to end of this line
  141.         x       Delete character
  142.         X       Delete character before cursor
  143.  
  144. Yank and Put
  145. ============
  146.  
  147.     y    yank some text (see "operators")
  148.         Y       Yank current line
  149.         :y      Yank current line
  150.         :17y    Yank line 17
  151.         :3,5y   Yank lines from 3 to 5 inclusive
  152.  
  153.         p       Put back text last yanked or deleted (see "operators")
  154.         P       As p, but before current position
  155.         :put    Put back text (same as 'p')
  156.         :5put   Put back text after line 5
  157.         :$put   Put back text at end of buffer
  158.         :0put   Put back text at start of buffer
  159.  
  160.     "x    Prefix before any of 'yYpP', uses named buffer x to store text
  161.         Buffer name may be any lower-case letter, '@' (the default),
  162.         or ':' which normally stores the last colon command executed.
  163.     "xp    Inserts contents of named buffer x after current position
  164.  
  165.     @x    Take contents of named yank buffer as command input
  166.     @@    Take last yanked or deleted text as input
  167.     @:    Redo last colon command
  168.  
  169. Undo & Redo
  170. ===========
  171.  
  172.         u       Undo last change
  173.         U       Restore current line (not yet implemented)
  174.         .       Repeat last change
  175.  
  176. Global Editing
  177. ==============
  178.  
  179.         :s/RE/SUB/      Change 1st RE in current line to SUB
  180.         :s/RE/SUB/g     Change all RE's in current line to SUB
  181.         :g/RE/p         Print all lines containing RE
  182.         :g/RE/d         Delete all lines containing RE
  183.         :g/RE/s/...     Perform 's' command on all lines containing RE
  184.     :&        Redo last substitution
  185.     :~        Substitute last SUB for last RE used    
  186.  
  187.     Any of the above may be preceded by a line range, e.g. 12,15.
  188.  
  189.     &        Redo last substitution (same as :&)
  190.  
  191.     :x,yyank    Yank lines from x through y
  192.     :x,ydelete    Delete lines from x through y
  193.     :x,ycopyz    Copy lines from x through y to after line z
  194.     :x,ymovez    Move lines from x through y to after line z
  195.  
  196. File and buffer manipulation
  197. ============================
  198.  
  199.         ZZ      Same as :x
  200.  
  201.         :w      Write buffer to file
  202.         :w name Write buffer to file "name"
  203.         :wq     Write buffer to file and then quit
  204.         :x      Close window, if last window onto buffer then:
  205.                         Write buffer if modified, then close buffer
  206.         :cl     Close current window, closing buffer if only window onto it
  207.         :cl!    Close current window, discarding any changes
  208.         :q      Quit
  209.         :q!     Quit, discarding any changes
  210.         :b      Create new buffer and window
  211.         :b name Create new buffer and window, editing file "name"
  212.         :split  Create a new screen window onto the current buffer
  213.         :e name Edit file "name" in current buffer
  214.         :e!     Reedit current file, discarding any changes
  215.         :e #    Edit file which was last closed
  216.     ^^    (Control-uparrow) Same as :e #
  217.         :n      Edit next file in arglist
  218.         :n args Specify new arglist
  219.         :wn     Write current file and edit next
  220.         :args   Show list of files being edited
  221.         :rew    Rewind arglist to start
  222.         :f      Show current file and lines
  223.         ^G      Same as :f
  224.         :f name Change current file name to "name"
  225.         :ta tag Find tag entry "tag" and go to it
  226.         ^]      :ta, current word is tag
  227.         :cd dir Change current directory
  228.         :so file
  229.                 Read commands from file
  230.  
  231. Displaying and Setting Parameters
  232. =================================
  233.  
  234.         :set            Display parameters which have been set
  235.         :set all        Display values of all parameters
  236.         :set name       Set the boolean parameter "name"
  237.         :set noname     Unset the boolean parameter "name"
  238.         :set name=value Set the string or numeric parameter "name" to "value"
  239.  
  240. Key Mapping
  241. ===========
  242.  
  243.         :map lhs rhs
  244.                 Causes input of "lhs" to produce input "rhs" instead.
  245.         :map! lhs rhs
  246.                 Like map, but works in insert mode instead.
  247.         :map    Display all current maps.
  248.         :set timeout=<num>
  249.                 Re-set the number of milliseconds that the editor waits
  250.                 for another character to be entered to complete a map.
  251.                 Default value is 200, which is okay for fast typists.
  252.         :set remap
  253.                 When "remap" is set, the result of a map is re-processed
  254.                 through the map system. This option is extremely dangerous,
  255.                 as it can cause uncontrolled recursion.
  256.  
  257. Command line options
  258. ====================
  259.  
  260.         -s param=value  Set param to value before starting
  261.         -t tag          Edit file containing tag
  262.         +num            Start up editing file at line num
  263.         +/pat           Start up editing file at line containing pat
  264.  
  265. Using the mouse (not implemented on all systems)
  266. ================================================
  267.  
  268.         Click mouse button on:
  269.  
  270.         any line outside current window
  271.  
  272.                 Change current window to the one indicated by the mouse
  273.                         (can be used instead of 'g')
  274.  
  275.         top line of current window
  276.  
  277.                 Scroll window downwards
  278.                         (same as '^Y')
  279.  
  280.         bottom line of current window
  281.  
  282.                 Scroll window upwards
  283.                         (same as '^E')
  284.  
  285.         any other line of current window
  286.         (or either line of a 2-line window)
  287.  
  288.                 Grow window by 1 line
  289.                         (same as '^W')
  290.  
  291.         status line of current window
  292.  
  293.                 Show current file and lines
  294.                         (same as '^G')
  295.